package com.isorf.service.impl;

import com.isorf.mapper.AdminMapper;
import com.isorf.pojo.Admin;
import com.isorf.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service    // 将当前类交给spring管理，让Spring给我实例化对象
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;

    @Override
    public Boolean login(String username, String password) {
        //Sevice层调用Mapper层
        Admin admin = adminMapper.login(username, password);
        if(admin != null){
            return true;
        }else {
            return false;
        }
    }
}
